#Target
TgtFile = pinpad

SrcFile0 = pinpad
SrcFile1 = pp1000
SrcFile2 = pp101
SrcFile3 = ppicge

# App Source Paths
SrcDir = C:\softpay\ver30\SOURCE\PINPAD

AppObjects = \
	$(OBJ_DIR)\$(SrcFile0).o  \
	$(OBJ_DIR)\$(SrcFile1).o  \
	$(OBJ_DIR)\$(SrcFile2).o  \
	$(OBJ_DIR)\$(SrcFile3).o  

# Compiler Options
MkIncludes = -J $(SDS_INCLUDES) -I $(ACT_INCLUDES) -I $(SP2_INCLUDES) 
COptions = $(GCOPTIONS) -c -O2 -bi -g+ -cpu ARM920T -Wrx -DK2 -DARM -o$(@)

#  Target Definition Library
$(LIB_DIR)\$(TgtFile).a : $(AppObjects)
	@$(RVCTBIN)\armar -r $(LIB_DIR)\$(TgtFile).a $(AppObjects)


$(OBJ_DIR)\$(SrcFile0).o : $(SrcDir)\$(SrcFile0).c \
		C:\softpay\ver30\SOURCE\INCLUDE\txoinc.h\
		C:\softpay\ver30\SOURCE\INCLUDE\format.h\
		C:\softpay\ver30\SOURCE\INCLUDE\fleet.h\
		C:\softpay\ver30\SOURCE\INCLUDE\scdefine.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\scalls.h\
		C:\softpay\ver30\SOURCE\INCLUDE\spamsg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\transact.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msgfuncs.h\
		C:\softpay\ver30\SOURCE\INCLUDE\HDT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\Scproto.h\
		C:\softpay\ver30\SOURCE\INCLUDE\handheld.h\
		C:\softpay\ver30\SOURCE\INCLUDE\gds.h\
		C:\softpay\ver30\SOURCE\INCLUDE\amount.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ui.h\
		C:\softpay\ver30\SOURCE\INCLUDE\init.h\
		C:\softpay\ver30\SOURCE\INCLUDE\check.h\
		C:\softpay\ver30\SOURCE\INCLUDE\trt.h\
		C:\softpay\ver30\SOURCE\INCLUDE\codesec.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pp101.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ConfProto.h\
		C:\softpay\ver30\SOURCE\INCLUDE\validt.h\
		C:\softpay\ver30\SOURCE\INCLUDE\TCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\date.h\
		C:\softpay\ver30\SOURCE\INCLUDE\passwd.h\
		C:\softpay\ver30\SOURCE\INCLUDE\CDT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pwrfids.h\
		C:\softpay\ver30\SOURCE\INCLUDE\funcids.h\
		C:\softpay\ver30\SOURCE\INCLUDE\PCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\stats.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pp1000.h\
		C:\softpay\ver30\SOURCE\INCLUDE\CST.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pfr.h\
		C:\softpay\ver30\SOURCE\INCLUDE\util.h\
		C:\softpay\ver30\SOURCE\INCLUDE\Tran.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pinpad.h\
		C:\softpay\ver30\SOURCE\INCLUDE\Rs232.h\
		C:\softpay\ver30\SOURCE\INCLUDE\SPDebug.h\
		C:\softpay\ver30\SOURCE\INCLUDE\entry.h\
		C:\softpay\ver30\SOURCE\INCLUDE\PINmsg.H\
		C:\softpay\ver30\SOURCE\INCLUDE\DCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\print.h\
		C:\softpay\ver30\SOURCE\INCLUDE\batch.h\
		C:\softpay\ver30\SOURCE\INCLUDE\table.h 
	@echo COMPILING...$(SrcFile0).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile0).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile1).o : $(SrcDir)\$(SrcFile1).c \
		C:\softpay\ver30\SOURCE\INCLUDE\codesec.h\
		C:\softpay\ver30\SOURCE\INCLUDE\txoinc.h\
		C:\softpay\ver30\SOURCE\INCLUDE\SPDebug.h\
		C:\softpay\ver30\SOURCE\INCLUDE\transact.h\
		C:\softpay\ver30\SOURCE\INCLUDE\TCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pinpad.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pp1000.h\
		C:\softpay\ver30\SOURCE\INCLUDE\util.h\
		C:\softpay\ver30\SOURCE\INCLUDE\print.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ui.h 
	@echo COMPILING...$(SrcFile1).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile1).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile2).o : $(SrcDir)\$(SrcFile2).c  
	@echo COMPILING...$(SrcFile2).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile2).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile3).o : $(SrcDir)\$(SrcFile3).c \
		C:\softpay\ver30\SOURCE\INCLUDE\comm.h\
		C:\softpay\ver30\SOURCE\INCLUDE\format.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pspup.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pspdh.h\
		C:\softpay\ver30\SOURCE\INCLUDE\date.h\
		C:\softpay\ver30\SOURCE\INCLUDE\form.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pform.h\
		C:\softpay\ver30\SOURCE\INCLUDE\util.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ppicge.h\
		C:\softpay\ver30\SOURCE\INCLUDE\packet.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pinpad.h\
		C:\softpay\ver30\SOURCE\INCLUDE\init.h\
		C:\softpay\ver30\SOURCE\INCLUDE\tfm.h\
		C:\softpay\ver30\SOURCE\INCLUDE\tip.h\
		C:\softpay\ver30\SOURCE\INCLUDE\spdh.h\
		C:\softpay\ver30\SOURCE\INCLUDE\recptfrm.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msgfuncs.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ui.h\
		C:\softpay\ver30\SOURCE\INCLUDE\Tran.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\print.h\
		C:\softpay\ver30\SOURCE\INCLUDE\transact.h\
		C:\softpay\ver30\SOURCE\INCLUDE\SPDebug.h 
	@echo COMPILING...$(SrcFile3).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile3).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

